#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Constraint.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class Interval;

/// <summary>
/// IntervalConstraint
/// An IntervalConstraint is a Constraint that is specified by an Interval.
/// </summary>
class UMLMODEL_EXPORT IntervalConstraint : public Constraint {

public: // Constructors and destructors
    explicit IntervalConstraint(const QString& umlType="uml::IntervalConstraint");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// specification getter
    /// The Interval that specifies the condition of the IntervalConstraint.
    /// </summary>
    shared_ptr<Interval> specification() const;

    /// <summary>
    /// specification setter
    /// The Interval that specifies the condition of the IntervalConstraint.
    /// </summary>
    void setSpecification(shared_ptr<Interval> value);

private: // Fields
    /// <summary>
    /// specification
    /// The Interval that specifies the condition of the IntervalConstraint.
    /// </summary>
    shared_ptr<Interval> specification_;

};

} // namespace uml
